<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./index.js"></script>

</head>
<body>
    <button id="btn">导出</button>
    <script>
        window.onload=()=>{
            console.log('--------showExportTip',showExportTip);
            var params = {
                header: [{a:'表头a',b:'表头b'}], // 一级表头
                headers: [{columnname:'表头a',display:'a',__colSpan:2,columns:[{columnname:'表头a1',display:'a1'},{columnname:'表头a2',display:'a2'}]},{columnname:'表头b',display:'b',columns:[{columnname:'表头b1',display:'b1'}]}], // 多级表头 [{a:'表头a',columns:[{a1:'表头a1'}]}]
                data: [{a:'1',b:'2'}], // 表格数据 []
                statisticsColumns: [], // 合计列数据
                column: [{columnname:'表头a',display:'a',columns:[{columnname:'表头a1',display:'a1'}]},{columnname:'表头b',display:'b',columns:[{columnname:'表头b1',display:'b1'}]}], // 表格列的数据描述
                fileName: 'hhhhhh.xls',  // 导出文件名
                caption: '顶部合并数据', // 表头上的标题
                isShowZero: true, // 是显示 0
                newFn: showExportTip,  // 回调
                customColumnsSHowZero: true  // 兼容以0开头的数据要显示0
            }

            var btn= document.getElementById("btn");
            btn.onclick = function(){
                console.log('------');
                exportExcelFromFront(params, function (res) {
                showExportTip(res)
            })
            }
        }
</script>
</body>
</html>